﻿<UserControl x:Class="AllenalaMente.Games.NewPuzzle.NewPuzzle"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="400" d:DesignWidth="800">

    <StackPanel x:Name="mainContentPageContainer" Grid.Row="2">
        <StackPanel.Projection>
            <PlaneProjection x:Name="mainPanelProjection" />
        </StackPanel.Projection>
        <StackPanel.Resources>
            <Storyboard x:Name="FlipStart">
                <DoubleAnimation From="0" To="90" Duration="00:00:0.5" Completed="Flip1Half_Completed"
           Storyboard.TargetName="mainPanelProjection"
           Storyboard.TargetProperty="RotationY">
                </DoubleAnimation>
            </Storyboard>
            <Storyboard x:Name="FlipEnd">
                <DoubleAnimation From="270" To="360" Duration="00:00:0.5" 
            Storyboard.TargetName="mainPanelProjection" 
            Storyboard.TargetProperty="RotationY">
                    <DoubleAnimation.EasingFunction>
                        <BounceEase Bounces="0" />
                    </DoubleAnimation.EasingFunction>
                </DoubleAnimation>
            </Storyboard>
        </StackPanel.Resources>
        <Canvas x:Name="LayoutRoot">

            <Canvas Name="canvasMask" Width="800" Height="400" Background="White" Opacity="0.5" Canvas.Top="2" />
            <Canvas Name="canvasGame" Width="800" Height="400">
                <Image Source="/AllenalaMente;component/Assets/Images/Backgrounds/SfondoLogic.jpg" Width="800" Visibility="Collapsed" Height="480"></Image>

                <TextBlock Canvas.Left="600" Canvas.Top="150" Height="100" Name="scoreText"  Text="" Width="120" FontSize="26" TextAlignment="Center" Foreground="Red" />
            </Canvas>

            <TextBlock Canvas.Left="0" Canvas.Top="280" Height="40" Name="textBlockMessage" Text="" Width="800" FontSize="22" TextAlignment="Center" Foreground="Black"/>
            <TextBlock Canvas.Left="0" Canvas.Top="334" Height="28" Name="textBlockMessage2" Text="" Width="800" FontSize="12" TextAlignment="Center" Foreground="Black"/>
            <!--<TextBlock Canvas.Left="16" Canvas.Top="17" Height="47" Name="textBlockTime" Text="Time" Width="101" FontSize="20" TextAlignment="Center" />
    <TextBlock Canvas.Left="208" Canvas.Top="13" Height="33" Name="textBlockCount1" Text="Giuste:" Width="101" FontSize="20" TextAlignment="Center" />
    <TextBlock Canvas.Left="408" Canvas.Top="13" Height="33" Name="textBlockCount2" Text="Sbagliate:" Width="101" FontSize="20" TextAlignment="Center" />-->

            <!--<Button Content="Hai vinto!" Height="70" HorizontalAlignment="Left" Margin="109,93,0,0" Name="buttonClose" VerticalAlignment="Top" Width="142" FontSize="16" Click="buttonClose_Click" />-->
            <Rectangle Canvas.Left="70" Canvas.Top="50" Fill="Green" Opacity="0.3" Width="300" Height="300" ></Rectangle>
            <Canvas Canvas.Left="70" Canvas.Top="50" Width="300" Height="300"  Name="PiecesCanvas">

            </Canvas>

            <!-- Canvas dove inserisco i pezzi da selezionare-->
            <Rectangle Canvas.Left="450" Canvas.Top="50" Fill="Blue" Opacity="0.3" Width="315" Height="315" ></Rectangle>
            <Canvas Canvas.Left="450" Canvas.Top="50" Width="315" Height="300"  Name="SelectPiecesCanvas"></Canvas>

            <!-- rettangolo di errore-->
            <!--<Rectangle Name="errorRect" Canvas.Left="70" Canvas.Top="50" Fill="Red" Width="696" Height="315" Visibility="Collapsed" ></Rectangle>-->
            <!-- rettangolo risposta esatta-->
            <!--<Rectangle Name="rightResRect" Canvas.Left="70" Canvas.Top="50" Fill="Green" Width="696" Height="315" Visibility="Collapsed" ></Rectangle>-->

            <Canvas Canvas.ZIndex="100" Name="answerImgCanvas" Width="800" Height="400">
                <Image Name="errorRect" Opacity="0" IsHitTestVisible="False" Source="/AllenalaMente;component/Assets/Images/UI/sbagliato.png" Width="300" Height="230" Canvas.Left="247" Canvas.Top="90" />
                <Image Name="rightResRect" Opacity="0" IsHitTestVisible="False" Source="/AllenalaMente;component/Assets/Images/UI/giusto.png" Width="300" Height="230" Canvas.Left="247" Canvas.Top="90" />
            </Canvas>

            <!--Canvas di countdown-->
            <Canvas Name="CanvasCountdown" Width="800" Height="400" Background="Black" Opacity="0.4">
                <TextBlock Name="TextBlockReady" Canvas.Top="140" Text="Ready?" Width="800" Height="100" FontWeight="Bold" Foreground="White" TextAlignment="Center" FontSize="56" FontFamily="Comic Sans MS"></TextBlock>
            </Canvas>
        </Canvas>
    </StackPanel>
</UserControl>

